#include <stdio.h>
#include <windows.h>

int arr[100];
void SelectNum(int a[],int sz)
{
	int k = 0;
	for (int i = 0; i < sz; i++){
		if (a[i] % 2){
			arr[k] = a[i];
			k++;
		}		
	}
	for (int i = 0; i < sz; i++){
		if (a[i] % 2 == 0){
		arr[k] = a[i];
			k++;
		}
	}
	for (int i = 0; i < sz; i++){
		printf("%d ", arr[i]);
	}
	printf("\n");
}

int main()
{
	int a[] = { 11, 22, 23, 24, 17, 90, 1, 8, 289 };
	int sz = sizeof(a) / sizeof(a[0]);
	SelectNum(&a,sz);
	system("pause");
	return 0;
}